//
//  FirstViewController.m
//  shoppingMall
//
//  Created by Bear on 2016/10/27.
//  Copyright © 2016年 dragontrail. All rights reserved.
//

#import "FirstViewController.h"
#import "ShoppingCartViewController.h"
#import "GoodsModel.h"
#import "GoodsManager.h"

@interface FirstViewController ()

@property(nonatomic, retain)NSMutableArray* sourceArr;

@end

@implementation FirstViewController

-(NSMutableArray *)sourceArr{

    if (!_sourceArr) {
        _sourceArr = [NSMutableArray array];
    }
    return _sourceArr;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)action:(UIButton *)sender {


    [[GoodsManager defaultManager]  createGoodsList];

    ShoppingCartViewController* shoppingCart = [[ShoppingCartViewController alloc] init];
    shoppingCart.goodsStoreDictionary = [GoodsManager defaultManager].GoodsTotalDic;
    [self.navigationController pushViewController:shoppingCart animated:YES];
    
}



@end
